package indi.coffeenc.queuedownloader.controller;

import indi.coffeenc.queuedownloader.TaskHolder;
import indi.coffeenc.queuedownloader.strategy.Task;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @GetMapping("/test")
    public String test(){
        Task task = new Task();
        Task.URL url = new Task.URL("http://baidu.com");
        task.add(url);
        task.add(url);
        task.add(url);
        TaskHolder.add(task);
        return TaskHolder.getAll().toString();
    }
}
